<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>系统附件列表</title>
    <jsp:include page="/WEB-INF/view/commons/css.jsp" />
</head>
<body >
<div id="main-container" class="container-fluid">
    <form action="sysattachment/dolist" method="post" name="searchForm" id="searchForm" role="form" class="form-horizontal">


        <div class="form-group">
            <label class="col-sm-1 control-label">用户登录名：</label>
            <div class="col-md-4">
                <input type="text" class="form-control" name="title" value="${searchEntity.title}" placeholder="用户登录名">
            </div>
            <label class="col-sm-1 control-label">原文件名：</label>
            <div class="col-md-4">
                    <input type="text" class="form-control" name="oldName" value="${searchEntity.oldName}" placeholder="原文件名">

            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-1 control-label">新文件名：</label>
            <div class="col-md-4">
                <input type="text" class="form-control" name="newName" value="${searchEntity.newName}" placeholder="新文件名">
            </div>
            <label class="col-sm-1 control-label">路径：</label>
            <div class="col-md-4">
                    <input type="text" class="form-control" name="path" value="${searchEntity.path}" placeholder="路径">

            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-1 control-label">文件类型：</label>
            <div class="col-md-4">
                <input type="text" class="form-control" name="fileType" value="${searchEntity.fileType}" placeholder="文件类型">
            </div>
            <label class="col-sm-1 control-label">模块：</label>
            <div class="col-md-4">
                    <input type="text" class="form-control" name="moduleName" value="${searchEntity.moduleName}" placeholder="模块">

            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-1 control-label">关联id：</label>
            <div class="col-md-4">
                <input type="text" class="form-control" name="refId" value="${searchEntity.refId}" placeholder="关联id">
            </div>
            <label class="col-sm-1 control-label">关联id：</label>
            <div class="col-md-4">
                <div class="input-group">
                    <input type="text" class="form-control" name="refId" value="${searchEntity.refId}" placeholder="关联id">
                    <div class="input-group-btn">
                        <button id="searchBtn" type="button" class="btn btn-sm btn-info"><i class="fa fa-search"></i> 搜索</button>
                    </div>
                </div>

            </div>
        </div>
    </form>
    <div class="row">
        <div class="col-md-10">
            <p>
                <shiro:hasPermission name="sysattachment:add">
                    <button type="button" data-url="sysattachment/create" class="btn btn-sm btn-success link_add" data-title="新增系统附件"><i class="fa fa-plus"></i> 新增</button>
                </shiro:hasPermission>
                <shiro:hasPermission name="sysattachment:edit">
                    <button type="button" data-url="sysattachment/edit" class="btn btn-sm btn-primary link_edit" data-title="编辑系统附件"><i class="fa fa-edit"></i> 修改</button>
                </shiro:hasPermission>
                <shiro:hasPermission name="sysattachment:delete">
                    <button type="button" data-url="sysattachment/delete" class="btn btn-sm btn-danger link_del"><i class="fa fa-trash"></i> 删除</button>
                </shiro:hasPermission>
                <shiro:hasPermission name="sysattachment:view">
                    <button type="button" data-url="sysattachment/info" class="btn btn-sm link_info" data-title="系统附件详情"><i class="fa fa-book"></i> 详情</button>
                </shiro:hasPermission>
            </p>
        </div>
    </div>

    <table id="table_data" class="table table-striped table-bordered table-hover">
        <thead>
        <tr>
            <th class="center td-checkbox" width="5%">
                <label><input type="checkbox" class="check-all ace" data-tableid="table_data" /><span class="lbl"></span></label>
            </th>
            <th width="10%">用户登录名</th>
            <th width="10%">原文件名</th>
            <th width="10%">新文件名</th>
            <th width="10%">路径</th>
            <th width="10%">文件类型</th>
            <th width="10%">模块</th>
            <th width="10%">关联id</th>
        </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</div>
<!-- 返回顶部  -->
<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
    <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
</a>
<!-- script start -->
<jsp:include page="/WEB-INF/view/commons/js.jsp" />
<script type="text/javascript">
    $(document).ready(function(e) {
        var table = $("#table_data").dataTable({
            ajax: function(data, callback, settings){
                tableAjax($("#searchForm"),data, callback, settings);
            },
            //列表表头字段
            columns: [
                mainConfig.checkboxColumn,
        { "data": "title",name:"title" },
        { "data": "oldName",name:"old_name" },
        { "data": "newName",name:"new_name" },
        { "data": "path",name:"path" },
        { "data": "fileType",name:"file_type" },
        { "data": "moduleName",name:"module_name" },
        { "data": "refId",name:"ref_id" }
        ]
    }).api();

        //查询条件
        $("#searchForm").submit(function(){
            table.ajax.reload();
            return false;
        });
    });
</script>
<!-- script end -->
</body>
</html>